package com.ztorn.fiscale.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ztorn.common.core.annotation.Excel;
import com.ztorn.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 平台授权配置对象 fiscale_platform_config
 * 
 * @author ztorn
 * @date 2024-01-01
 */
public class FiscalePlatformConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 配置ID */
    private Long configId;

    /** 平台实例名称 */
    @Excel(name = "平台实例名称")
    private String platformName;

    /** 平台类型ID */
    private Long typeId;

    /** 平台类型编码 */
    @Excel(name = "平台类型编码")
    private String typeCode;

    /** 平台类型名称 */
    @Excel(name = "平台类型名称")
    private String typeName;

    /** API密钥 */
    @Excel(name = "API密钥")
    private String apiKey;

    /** 配置数据JSON */
    private String configData;

    /** 状态 */
    @Excel(name = "状态", readConverterExp = "0=停用,1=启用,2=测试中,3=连接失败")
    private String status;

    /** 最后同步时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后同步时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastSyncTime;

    /** 同步状态 */
    @Excel(name = "同步状态", readConverterExp = "0=未同步,1=同步中,2=同步成功,3=同步失败")
    private String syncStatus;

    /** 错误信息 */
    private String errorMessage;

    /** 测试结果 */
    private String testResult;

    public void setConfigId(Long configId) 
    {
        this.configId = configId;
    }

    public Long getConfigId() 
    {
        return configId;
    }

    public void setPlatformName(String platformName) 
    {
        this.platformName = platformName;
    }

    public String getPlatformName() 
    {
        return platformName;
    }

    public void setTypeId(Long typeId) 
    {
        this.typeId = typeId;
    }

    public Long getTypeId() 
    {
        return typeId;
    }

    public void setTypeCode(String typeCode) 
    {
        this.typeCode = typeCode;
    }

    public String getTypeCode() 
    {
        return typeCode;
    }

    public void setTypeName(String typeName) 
    {
        this.typeName = typeName;
    }

    public String getTypeName() 
    {
        return typeName;
    }

    public void setApiKey(String apiKey) 
    {
        this.apiKey = apiKey;
    }

    public String getApiKey() 
    {
        return apiKey;
    }

    public void setConfigData(String configData) 
    {
        this.configData = configData;
    }

    public String getConfigData() 
    {
        return configData;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setLastSyncTime(Date lastSyncTime) 
    {
        this.lastSyncTime = lastSyncTime;
    }

    public Date getLastSyncTime() 
    {
        return lastSyncTime;
    }

    public void setSyncStatus(String syncStatus) 
    {
        this.syncStatus = syncStatus;
    }

    public String getSyncStatus() 
    {
        return syncStatus;
    }

    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }

    public void setTestResult(String testResult) 
    {
        this.testResult = testResult;
    }

    public String getTestResult() 
    {
        return testResult;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("configId", getConfigId())
            .append("platformName", getPlatformName())
            .append("typeId", getTypeId())
            .append("typeCode", getTypeCode())
            .append("typeName", getTypeName())
            .append("apiKey", getApiKey())
            .append("configData", getConfigData())
            .append("status", getStatus())
            .append("lastSyncTime", getLastSyncTime())
            .append("syncStatus", getSyncStatus())
            .append("errorMessage", getErrorMessage())
            .append("testResult", getTestResult())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}